#ifndef __FLUIDBB_H__

#include	"resource.h"
#include	"CKAll.h"

#define IX(i,j) ((i)+(N+2)*(j))
#define SWAP(x0,x) {float * tmp=x0;x0=x;x=tmp;}
#define FOR_EACH_CELL for ( i=1 ; i<=N ; i++ ) { for ( j=1 ; j<=N ; j++ ) {
#define END_FOR }}

#define		PLUGIN_GUID CKGUID(0x7e79454b,0x4ff77e4a)
#define		AUTHOR_GUID CKGUID(0x1a430a1a,0x20ca68db)

#define		UPDATEFLUID_GUID CKGUID(0x7542e04,0x539a1af2)
#define		ADDVELOCITY_GUID CKGUID(0x68973ac5,0x58845e90)
#define		ADDDENSITY_GUID CKGUID(0x4ab40881,0xe24a8b)
#define		CLEAR_GUID CKGUID(0x421218f8,0x33d109d3)
#define		WRITETEXTURE_GUID CKGUID(0x731a0843,0x591072f0)

#define		CKPGUID_BORDERMODE CKGUID(0x612140ed,0xfbc78c9)


/* global variables */

extern int N;
extern float dt, diff, visc, loss;

extern float force, source;
extern int border_mode;
extern int dvel;

extern float * u, * v, * u_prev, * v_prev;
extern float * dens, * dens_prev;

#endif